# Maintainer: Celeste <cielesti@protonmail.com>
maintainer="Celeste <cielesti@protonmail.com>"
pkgname=critcl
pkgver=3.3.1
pkgrel=0
pkgdesc="Compiled Runtime in Tcl"
url="https://andreas-kupries.github.io/critcl/"
arch="all"
license="TCL"
depends="gcc musl-dev tcl tcl-lib"
makedepends="tcl-dev"
subpackages="$pkgname-doc"
source="https://github.com/andreas-kupries/critcl/archive/$pkgver/critcl-$pkgver.tar.gz"

build() {
	./build.tcl doc
}

check() {
	./build.tcl test
}

package() {
	./build.tcl install --dest-dir "$pkgdir" --prefix /usr

	install -Dvm644 embedded/man/files/*.n \
		-t "$pkgdir"/usr/share/man/mann/

	install -Dvm644 license.terms \
		"$pkgdir"/usr/share/licenses/$pkgname/LICENSE

	install -Dvm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname/
	cp -vr examples "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
c9abb1c15d206b608fe54c61b169dbbaddf962bccff3997d06fc1552c282f0f9268d408659c15e9d1a9cadf05a878add62fe9d803b326c3b85c370ec43ff4c93  critcl-3.3.1.tar.gz
"
